package com.santu.edu.supporter.biz.good.service;

import com.santu.edu.supporter.biz.good.pojo.dto.GoodDTO;
import com.santu.edu.supporter.biz.good.pojo.params.GoodAddParam;
import com.santu.edu.supporter.biz.good.pojo.params.GoodUpdateParam;
import com.santu.edu.supporter.biz.order.pojo.dto.GoodInfo;

import java.util.List;

/**
 * @author luoyaoqi
 * @createTime 2024/3/12
 * @description
 */
public interface GoodService {
    /**
     * 添加商品
     *
     * @param addParam
     * @return
     */
    Boolean addGood(GoodAddParam addParam);

    /**
     * 更新商品
     *
     * @param updateParam
     * @return
     */
    Boolean updateGood(GoodUpdateParam updateParam);

    /**
     * 删除商品
     *
     * @param goodId
     * @return
     */
    Boolean removeGood(String goodId);

    /**
     * 获取商品列表
     *
     * @return
     */
    List<GoodDTO> getGoodList(String categoryId);


    /**
     * 扣减库存
     *
     * @param goodInfoList
     * @return
     */
    Boolean lessGood(List<GoodInfo> goodInfoList);

}
